/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Sharif
 */
import java.util.Date;
import models.*;

import org.junit.Test;

import play.test.Fixtures;
import play.test.UnitTest;


public class Sharif extends UnitTest {

	@Test
        public void NotificationSend() {
		Fixtures.deleteAll();
                IdeaDeveloper karim = new IdeaDeveloper("karim", "karim", "karim",
				"karim.abdo1991@gmail.com", "1/1/2000", "karim");
		karim.save();
		IdeaDeveloper sharif = new IdeaDeveloper("sharif", "sharif", "sharif",
				"sharif.alhef@gmail.com", "1/1/2000", "sharif");
		sharif.save();
		Notification.notify("has updated his profile", sharif, karim,
				new Date());

		sharif.save();

		sharif.save();
		Notification.notify("has added a new idea", sharif, karim, new Date());

		sharif.save();

		sharif.save();
		Notification.notify("has created a new entity", sharif, karim,
				new Date());

		sharif.save();

		assertEquals(3, sharif.notifications.size());

	}


}
